package ucd.csi.comp30220.fall2011.oteop.flight;

import java.io.Serializable;

import ucd.csi.comp30220.fall2011.oteop.navigation.Position;

/**
 * @author David Harrison
 */
public final class FlightStatus implements Serializable {
    
    private static final long serialVersionUID = -1286639542428011875L;

    public static final String JMDNS_SUB_TYPE = "flightstatus";
    
    private String number;
    private Position position;
    private int speed;
    private int altitude;
    private double course;
    
    public FlightStatus(
            String number,
            Position position,
            int speed,
            int altitude,
            double course) {
        this.number = number;
        this.position = position;
        this.speed = speed;
        this.altitude = altitude;
        this.course = course;
    }
    
    /** @return 'EI139' for Aer Lingus from Dublin to Boston */
    public String getNumber() {
        return number;
    }
    
    /** @return how fast we are going (knots) */
    public int getSpeed() {
        return speed;
    }
    
    /** @return how high we are right now (feet) */
    public int getAltitude() {
        return altitude;
    }

    /** @return where the heck we are */
    public Position getPosition() {
        return position;
    }
    
    /** @return where we are heading */
    public double getCourse() {
        return course;
    }

    public String toString() {
        return "FlightStatus [number=" + number + ", position=" + position
                + ", speed=" + speed + ", altitude=" + altitude + ", course="
                + course + "]";
    }
}
